<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="city" styleClass="edit">

        <rich:panel>
            <f:facet name="header">#{cityHome.managed ? 'Edit' : 'Add'} City</f:facet>




            <s:decorate id="nameField" template="layout/edit.xhtml">
                <ui:define name="label">Name</ui:define>
                <h:inputTextarea id="name"
                               cols="80"
                               rows="2"
                           required="true"
                              value="#{cityHome.instance.name}"/>
            </s:decorate>


            <s:decorate id="latField" template="layout/edit.xhtml">
                <ui:define name="label">Lat</ui:define>
                <h:inputTextarea id="lat"
                               cols="80"
                               rows="10"
                              value="#{cityHome.instance.lat}"/>
            </s:decorate>


            <s:decorate id="lonField" template="layout/edit.xhtml">
                <ui:define name="label">Lon</ui:define>
                <h:inputTextarea id="lon"
                               cols="80"
                               rows="10"
                              value="#{cityHome.instance.lon}"/>
            </s:decorate>





            <div style="clear:both">
                <span class="required">*</span>
                required fields
            </div>

        </rich:panel>

        <div class="actionButtons">

            <h:commandButton id="save"
                          value="Save"
                         action="#{cityHome.persist}"
                       disabled="#{!cityHome.wired}"
                       rendered="#{!cityHome.managed}"/>

            <h:commandButton id="update"
                          value="Save"
                         action="#{cityHome.update}"
                       rendered="#{cityHome.managed}"/>

            <h:commandButton id="delete"
                          value="Delete"
                         action="#{cityHome.remove}"
                      immediate="true"
                       rendered="#{cityHome.managed}"/>

            <s:button id="cancelEdit"
                   value="Cancel"
             propagation="end"
                    view="/City.xhtml"
                rendered="#{cityHome.managed}"/>

            <s:button id="cancelAdd"
                   value="Cancel"
             propagation="end"
                    view="/#{empty cityFrom ? 'CityList' : cityFrom}.xhtml"
                rendered="#{!cityHome.managed}"/>

        </div>
    </h:form>

<rich:tabPanel switchType="ajax">

    <rich:tab label="State *" labelClass="required">
    <div class="association" id="stateParent">

        <h:outputText value="There is no state associated with this city."
                   rendered="#{cityHome.instance.state == null}"/>

        <rich:dataTable var="_state"
                   value="#{cityHome.instance.state}"
                rendered="#{cityHome.instance.state != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="stateTable">
            <h:column>
                <f:facet name="header">Id state</f:facet>
                <h:outputText value="#{_state.idState}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Country id country</f:facet>
                <h:outputText value="#{_state.country.idCountry}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_state.name}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Code</f:facet>
                <h:outputText value="#{_state.code}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{cityHome.instance.state != null ? 'changeParent' : 'selectParent'}" value="#{cityHome.instance.state != null ? 'Change' : 'Select'} state"
                       view="/StateList.xhtml">
                <f:param name="from" value="CityEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>

    <rich:tab label="Requests for from city">
        <h:form styleClass="association" id="requestsForFromCityChildren">

            <h:outputText value="There are no requestsForFromCity associated with this city."
                       rendered="#{empty cityHome.requestsForFromCity}"/>

            <rich:dataTable value="#{cityHome.requestsForFromCity}"
                           var="_request"
                      rendered="#{not empty cityHome.requestsForFromCity}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="requestsForFromCityTable">
                <rich:column sortBy="#{_request.idRequest}">
                    <f:facet name="header">Id request</f:facet>
                    <h:outputText value="#{_request.idRequest}"/>
                </rich:column>
                <rich:column sortBy="#{_request.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_request.name}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_request.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_request.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_request.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_request.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_request.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_request.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_request.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_request.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_request.singleDay}"/>
                </rich:column>
                <rich:column sortBy="#{_request.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_request.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_request.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_request.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_request.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_request.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_request.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_request.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_request.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_request.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_request.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_request.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_request.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{cityHome.managed}" id="requestsForFromCity">
        <div class="actionButtons">
            <s:button id="addrequest"
                   value="Add request"
                    view="/RequestEdit.xhtml"
             propagation="none">
                 <f:param name="cityIdCity"
                         value="#{cityHome.instance.idCity}"/>
                 <f:param name="requestFrom" value="City"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Requests for to city">
        <h:form styleClass="association" id="requestsForToCityChildren">

            <h:outputText value="There are no requestsForToCity associated with this city."
                       rendered="#{empty cityHome.requestsForToCity}"/>

            <rich:dataTable value="#{cityHome.requestsForToCity}"
                           var="_request"
                      rendered="#{not empty cityHome.requestsForToCity}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="requestsForToCityTable">
                <rich:column sortBy="#{_request.idRequest}">
                    <f:facet name="header">Id request</f:facet>
                    <h:outputText value="#{_request.idRequest}"/>
                </rich:column>
                <rich:column sortBy="#{_request.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_request.name}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_request.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_request.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_request.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_request.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_request.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_request.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_request.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_request.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_request.singleDay}"/>
                </rich:column>
                <rich:column sortBy="#{_request.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_request.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_request.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_request.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_request.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_request.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_request.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_request.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_request.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_request.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_request.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_request.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_request.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{cityHome.managed}" id="requestsForToCity">
        <div class="actionButtons">
            <s:button id="addrequest"
                   value="Add request"
                    view="/RequestEdit.xhtml"
             propagation="none">
                 <f:param name="cityIdCity"
                         value="#{cityHome.instance.idCity}"/>
                 <f:param name="requestFrom" value="City"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Travels for to city">
        <h:form styleClass="association" id="travelsForToCityChildren">

            <h:outputText value="There are no travelsForToCity associated with this city."
                       rendered="#{empty cityHome.travelsForToCity}"/>

            <rich:dataTable value="#{cityHome.travelsForToCity}"
                           var="_travel"
                      rendered="#{not empty cityHome.travelsForToCity}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="travelsForToCityTable">
                <rich:column sortBy="#{_travel.idTravel}">
                    <f:facet name="header">Id travel</f:facet>
                    <h:outputText value="#{_travel.idTravel}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_travel.name}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_travel.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_travel.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_travel.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_travel.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_travel.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.travelState}">
                    <f:facet name="header">Travel state</f:facet>
                    <h:outputText value="#{_travel.travelState}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.calculatedRate}">
                    <f:facet name="header">Calculated rate</f:facet>
                    <h:outputText value="#{_travel.calculatedRate}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_travel.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_travel.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_travel.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_travel.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_travel.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_travel.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_travel.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_travel.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_travel.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_travel.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_travel.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_travel.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_travel.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_travel.singleDay}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{cityHome.managed}" id="travelsForToCity">
        <div class="actionButtons">
            <s:button id="addtravel"
                   value="Add travel"
                    view="/TravelEdit.xhtml"
             propagation="none">
                 <f:param name="cityIdCity"
                         value="#{cityHome.instance.idCity}"/>
                 <f:param name="travelFrom" value="City"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Travels for from city">
        <h:form styleClass="association" id="travelsForFromCityChildren">

            <h:outputText value="There are no travelsForFromCity associated with this city."
                       rendered="#{empty cityHome.travelsForFromCity}"/>

            <rich:dataTable value="#{cityHome.travelsForFromCity}"
                           var="_travel"
                      rendered="#{not empty cityHome.travelsForFromCity}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="travelsForFromCityTable">
                <rich:column sortBy="#{_travel.idTravel}">
                    <f:facet name="header">Id travel</f:facet>
                    <h:outputText value="#{_travel.idTravel}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_travel.name}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_travel.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_travel.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_travel.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_travel.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_travel.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.travelState}">
                    <f:facet name="header">Travel state</f:facet>
                    <h:outputText value="#{_travel.travelState}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.calculatedRate}">
                    <f:facet name="header">Calculated rate</f:facet>
                    <h:outputText value="#{_travel.calculatedRate}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_travel.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_travel.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_travel.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_travel.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_travel.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_travel.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_travel.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_travel.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_travel.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_travel.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_travel.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_travel.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_travel.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_travel.singleDay}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{cityHome.managed}" id="travelsForFromCity">
        <div class="actionButtons">
            <s:button id="addtravel"
                   value="Add travel"
                    view="/TravelEdit.xhtml"
             propagation="none">
                 <f:param name="cityIdCity"
                         value="#{cityHome.instance.idCity}"/>
                 <f:param name="travelFrom" value="City"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
